Stereo panning

Here, we focus on the StereoPannerNode. Two code examples are provided.
  1. Listener: a simple use of the StereoPannerNode, showing a minimal implementation.
  2. Stereo enhancer: a stereo enhancer or stereo widener effect, which takes a stereo input stream and re-represents it as mid and side rather than left and right components. The relative strength of these components can be varied to narrow or widen the audio stream's use of the stereo field.
Code examples correspond to examples from Chapter 16 in the book 'Working with the Web Audio API'. Feel free to contact me at joshua.reiss@qmul.ac.uk